<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登陆页</title>
	
<%@include file="/header.jsp" %>
<script type="text/javascript" src="/js/util.js"></script>
<script type="text/javascript">
	function login() {
		$.ajax({
			url:"/login",
			type:"post",
			data:$("form").serialize(),
			dataType:"json"
		}).done(function(data){
			if(data.isSuccess)
				window.location = "/main";
			else
				$.alert("alert-div", data.msg);
		})
	}
	
	$(function() {
		$(window).keydown(function(event){
			switch(event.keyCode) {
				case 13:login();
			}
		});
	});
</script>
</head>

<body>
<div class="ch-container">
    <div class="row">
    
    <!-- <div class="row">
    	<div class=""> -->
    	
    <!-- </div> -->
        
    <div class="row">
    	<div class="col-md-12 center login-header">
    		<img src="/img/index.png">
    	</div>
        <div class="col-md-12 center login-header">
            <h2 style="fon">文化创意产业项目虚拟仿真实验教学系统</h2>
        </div>
        <!--/span-->
    </div><!--/row-->

    <div class="row">
        <div class="well col-md-5 center login-box">
            <!-- <form class="form-horizontal" action="/login" method="post"> -->
            <form>
                <fieldset>
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-user red"></i></span>
                        <input type="text" name="username" class="form-control" placeholder="请输入用户名">
                    </div>
                    <div class="clearfix"></div><br>

                    <div class="input-group input-group-lg">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-lock red"></i></span>
                        <input type="password" name="password" class="form-control" placeholder="请输入密码">
                    </div>
                    <div class="clearfix"></div>

                    <!-- <div class="input-prepend">
                        <label class="remember" for="remember"><input type="checkbox" id="remember"> Remember me</label>
                    </div>
                    <div class="clearfix"></div> -->
					<br>
					<div id="alert-div"></div>

                    <p class="center col-md-5">
                        <a href="javascript:;" class="btn btn-primary" onclick="login();">登陆</a>
                    </p>
                    
                </fieldset>
            <!-- </form> -->
            </form>
        </div>
        <!--/span-->
        <div class="well col-md-5 center">
        	<h4>账号说明</h4>
        	管理员：admin-----123456<br>
        	老师：teacher-----123456<br>
        	学生：student-----123456<br>
        	专家：expert------123456
        </div>
    </div><!--/row-->
</div><!--/fluid-row-->

</div><!--/.fluid-container-->

</body>
</html>
